<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/admin/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
        <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="css/style.css"/>       
        <link href="assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/ace.min.css" />
        <link rel="stylesheet" href="font/css/font-awesome.min.css" />
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="js/jquery-1.9.1.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>  	         	
        <script src="assets/layer/layer.js" type="text/javascript" ></script>          
        <script src="assets/laydate/laydate.js" type="text/javascript"></script>
        <script src="js/H-ui.js" type="text/javascript"></script>
<title>公告详情</title>
</head>
<body>
<div class="margin clearfix">
 <div class="article_style">
 <form  id="annupdfrm">
    <div class="add_content" id="form-article-add">
     <ul>
  	 <c:forEach var="ann" items="${alist}">
      <li class="clearfix Mandatory">
      <label class="label_name">公告标题</label><span class="formControls col-10">${ann.anntitle}</span>
      </li>
      <li class="clearfix Mandatory">
      <label class="label_name">发布的管理员</label><span class="formControls col-10">${ann.admin.truename}</span>
      </li>
      <li class="clearfix Mandatory">
      <label class="label_name">发布时间</label><span class="formControls col-10"><fmt:formatDate value="${ann.createtime}" pattern="yyyy-MM-dd HH:mm:ss" /></span>
      </li>
      <li class="clearfix"><label class="label_name">公告内容</label>
      <span class="formControls col-10">${ann.anncontent}</span>
      </li>
      </c:forEach>
     </ul>
 </div>
</div>
</body>
</html>
<script type="text/javascript" src="Widget/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="Widget/ueditor/1.4.3/ueditor.all.min.js"> </script>
<script type="text/javascript" src="Widget/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script> 
<script type="text/javascript">
/**提交操作**/
function article_save_submit(){
	   $.ajax({
		   cache : true,
		   type:"post",
		   url:"/annount/updateByPrimaryKey",
		   data:$('#annupdfrm').serialize(),
		   async : false,
		   error : function(request) {
				alert("Connection error");
			},
			success : function(data) {
				if (data) {
					layer.msg('保存成功!', {
						icon : 6,
						time : 1000
					});
					setTimeout(function() {
						location.href = "/annount/selectByExample";
					}, 1000);
				} else {
					layer.msg('保存失败!', {
						icon : 2,
						time : 1000
					});
					return;
				}
			}
		});		
	}
$(function(){
	var ue = UE.getEditor('editor');
});
/*radio激发事件*/
function Enable(){ $('.date_Select').css('display','block');}
function closes(){$('.date_Select').css('display','none')}
/**日期选择**/
var start = {
    elem: '#start',
    format: 'YYYY/MM/DD',
    min: laydate.now(), //设定最小日期为当前日期
    max: '2099-06-16', //最大日期
    istime: true,
    istoday: false,
    choose: function(datas){
         end.min = datas; //开始日选好后，重置结束日的最小日期
         end.start = datas //将结束日的初始值设定为开始日
    }
};
var end = {
    elem: '#end',
    format: 'YYYY/MM/DD',
    min: laydate.now(),
    max: '2099-06-16 ',
    istime: true,
    istoday: false,
    choose: function(datas){
        start.max = datas; //结束日选好后，重置开始日的最大日期
    }
};
laydate(start);
laydate(end);
</script>